package com.licq.ldoc.parser.impl.annotation;

import java.lang.annotation.Annotation;

import net.sf.oval.constraint.EqualToField;

import com.licq.ldoc.domain.AbstractNode;
import com.licq.ldoc.parser.AnnotationParsee;
import com.licq.ldoc.parser.impl.TargetIgnorableAnnotationParsee;

public class EqualToFieldAnnotationParsee extends TargetIgnorableAnnotationParsee {
	
	public EqualToFieldAnnotationParsee(AnnotationParsee successor) {
		super(successor);
	}

	@Override
	protected void doParseTo(AbstractNode node, Annotation annotation) {
		EqualToField equalToField = (EqualToField) annotation;
		node.appendComments(String.format(getText(), equalToField.value()));
	}
	
}
